var path = require('path');

var baseFiles = [
    "ADF.js",
    // "Action.js",
    "base.property.common/PropertyDescriptor.js",
    "base.property.common/ColorPropertyDescriptor.js",
    "Model.js",
    "CompositeModel.js",
    // "Figure.js",
    "ControlMixin.js",
    "Control.js",
    "Editpart.js",
    "CompositeEditpart.js",
    // "Layout.js",
    "Composite.js",
    "PropertyEditorControl.js",
    // "Tool.js",
    "ModalRenderer.js",
    "PartFactory.js",
    "ControlFactory.js",
    "Designer.js",
    "descriptor/BundleDescriptor.js",
    "descriptor/ActionDescriptor.js",
    "descriptor/ControlDescriptor.js",
    "descriptor/CompositeDescriptor.js",
    "descriptor/PropertyDescriptor.js",
    "descriptor/ToolDescriptor.js",
    "ToolEntry.js",
    "base.property.common/res/TextPropertyEditor.js",
    "base.property.common/res/AttrColorPropertyEditor.js"

];
baseFiles.prefix = 'client';

function generate(array) {
    var result = [];
    array.forEach(function(files) {
        var r = [];
        if (files.prefix) {
            files.forEach(function(file) {
                r.push(path.join(files.prefix, file));
            });
        } else {
            r = files;
        }
        result = result.concat(r);
    });
    return result;
}

// var transformed_baseFiles = baseFiles.map(function(item){
//   return path.join('base', item);
// });
// var transformed_drawd2dFiles = drawd2dFiles.map(function(item){
//   return path.join('draw2d', item);
// });
//
// var transformed_gefFiles = gefFiles.map(function(item){
//   return path.join('gef2', item);
// });


exports.files = generate([baseFiles]);
// transformed_baseFiles.concat(transformed_drawd2dFiles).concat(transformed_gefFiles);